package com.hxd.service;

import com.hxd.dao.DepartmentDao;
import com.hxd.pojo.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    DepartmentDao departmentDao;
    //查询素有部门
    public List<Department> selectAlldepartment() {
        List<Department> departments = departmentDao.selectAlldepartment();
        return  departments;
    }

    //根据id 查找部门
    public Department selectOnedepartment(int id) {
        return departmentDao.selectOnedepartment(id);
    }
}
